﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using WebServer.Models;

namespace WebServer
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IFeedbacks”。
    [ServiceContract]
    public interface IFeedbacks
    {
       
        #region 意见反馈
        /// <summary>
        /// 意见反馈列表
        /// </summary>
        /// <param name="PageSize"></param>
        /// <param name="Page"></param>
        /// <param name="Userid"></param>
        /// <param name="Come"></param>
        /// <param name="Type"></param>
        /// <param name="Text"></param>     
        /// <param name="Order">默认根据时间排序，1-ID，2-用户，3-类型，4，来源</param>
        /// <param name="Desc"></param>
        /// <param name="IsDel"></param>
        /// <returns></returns>
        [OperationContract]
        List<UFeedback> FeedbackSearch(int PageSize, int Page, int UserID, string Come, string Type, string Text, int Order, bool Desc, int IsDel);



        /// <summary>
        /// 意见反馈列表总数
        /// </summary>    
        /// <param name="Userid"></param>
        /// <param name="Come"></param>
        /// <param name="Type"></param>
        /// <param name="Text"></param>            
        /// <param name="IsDel"></param>
        /// <returns></returns>
        [OperationContract]
        int FeedbackCount(int UserID, string Come, string Type, string Text, int IsDel);


        /// <summary>
        /// 删除意见反馈
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        [OperationContract]
        int DelFeedback(int ID);

        /// <summary>
        /// 新增或者修改意见反馈
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [OperationContract]
        int AddOrUpFeedback(UFeedback model);

        /// <summary>
        /// 根据ID获取意见反馈
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        [OperationContract]
        UFeedback FeedbackByID(int ID);

        #endregion
    }
}
